/**
 *	\file
 *	\brief represents a list of possibile values indicating the type of a single SyntaxNode.
 *
 *	Thhese values should be assigned to the field <i>type</i> of the struct SyntaxNode
 *
 * 	\date Aug 6, 2013
 * 	\author koldar
 */

#ifndef NODETYPE_H_
#define NODETYPE_H_

#include "stdio.h"

//pick up all the NodeType declaration in this file
//cat NodeType.h | sed '/^\s\s*\([A-Z_0-9][A-Z_0-9]*\)/!d' | sed 's/\s\s*\|,//g'

//TODO documentation
typedef enum NodeType {
	//nonterminal nodes
	NODE_PROGRAM						,
	NODE_CLASS_FILE						,
	NODE_GROUP_LABEL_FILE				,
	NODE_GROUP_LABELS_DEFINITION_SECTOR	,
	NODE_GROUP_LABELS_DEFINITION_LIST	,
	NODE_GROUP_LABELS_DEFINITION		,
	NODE_ID_LIST						,
	NODE_MODIFIER_SECTOR				,
	NODE_MODIFIER_LIST					,
	NODE_MODIFIER_ELEMENT				,
	NODE_MODE_POLICIES_SECTOR			,
	NODE_READ_POLICIES					,
	NODE_WRITE_POLICIES					,
	NODE_ACCESS_GROUP_LIST				,
	NODE_ACCESS_GROUP_ELEMENT			,
	NODE_TYPE							,
	NODE_SIMPLE_TYPE					,
	NODE_CLASS_TYPE						,
	NODE_ARRAY_TYPE						,
	NODE_REQUIRE_SECTOR					,
	NODE_REQUIRE_LIST					,
	NODE_REQUIRE_ELEMENT				,
	NODE_FIELD_DECLARATION_SECTOR		,
	NODE_FIELD_LIST						,
	NODE_FIELD_ELEMENT					,
	NODE_METHOD_DECLARATION_SECTOR		,
	NODE_METHOD_LIST					,
	NODE_METHOD							,
	NODE_RETURN_TYPE					,
	NODE_FORMAL_PARAM_DECLARATION_SECTOR,
	NODE_FORMAL_PARAM_DECLARATION_LIST	,
	NODE_FORMAL_PARAM_DECLARATION		,
	NODE_ACTUAL_PARAM_SECTOR			,
	NODE_ACTUAL_PARAM_LIST				,
	NODE_LEFT_HAND_SIDE					,
	NODE_FIELD_VAR						,
	NODE_PROCEDURE_CALL					,
	NODE_ARRAY_VAR						,
	NODE_NEW_INSTANCE					,
	NODE_INSTANCE_MODE					,
	NODE_BRACES_LIST					,
	NODE_BRACES_ELEMENT					,
	NODE_EXPR							,
	NODE_INNER_EXPR						,
	NODE_COMPARE_EXPR					,
	NODE_COMPARE_OPERATOR				,
	NODE_LOGIC_EXPR						,
	NODE_LOGIC_OPERATOR					,
	NODE_MATH_EXPR_1					,
	NODE_MATH_EXPR_2					,
	NODE_TERM_EXPR						,
	NODE_CONSTANT						,
	NODE_CLASS_DEFINITION				,
	NODE_ADDITIONAL_CLAUSES_SECTOR		,
	NODE_ADDITIONAL_CLAUSE_LIST			,
	NODE_ADDITIONAL_CLAUSE				,
	NODE_EXTENDS_CLAUSE					,
	NODE_GROUP_MEMBER_CLAUSE			,
	NODE_STAT_SECTOR					,
	NODE_STAT_LIST						,
	NODE_STAT							,
	NODE_LOCAL_VARIABLE					,
	NODE_ASSIGN_STAT					,
	NODE_WHILE_STAT						,
	NODE_DO_WHILE_STAT					,
	NODE_FOR_STAT						,
	NODE_IF_STAT						,
	NODE_ELSIF_ELSE_STAT_SECTOR			,
	NODE_ELSIF_ELSE_STAT_LIST			,
	NODE_ELSIF_STAT						,
	NODE_ELSE_STAT						,
	NODE_SWITCH_STAT					,
	NODE_SWITCH_LIST					,
	NODE_CASE_CLAUSE_LIST				,
	NODE_CASE_CLAUSE					,
	NODE_DEFAULT_CLAUSE					,
	NODE_CONTINUE_STAT					,
	NODE_BREAK_STAT						,
	NODE_RETURN_STAT					,
	//value focus nodes
	NODE_CHARCONST						,
	NODE_INTCONST						,
	NODE_FLOATCONST						,
	NODE_STRINGCONST					,
	NODE_BOOLCONST						,
	NODE_ID,
	//type nodes
	NODE_INT_TYPE						,
	NODE_CHAR_TYPE						,
	NODE_FLOAT_TYPE						,
	NODE_STRING_TYPE					,
	NODE_BOOL_TYPE						,
	//modifier nodes
	NODE_PUBLIC							,
	NODE_PACKAGE						,
	NODE_ALL							,
	NODE_ONLYME							,
	NODE_CHILDREN						,
	NODE_ABSTRACT						,
	NODE_CONST							,
	NODE_STATIC							,
	NODE_REFERENCE						,
	NODE_VALUE							,
	NODE_VOID							,
	NODE_REAL							,
	NODE_COPY							,
	NODE_THIS							,
	NODE_BREAK							,
	NODE_RETURN							,
	NODE_CONTINUE						,
	//operation nodes
	NODE_PLUS							,
	NODE_MINUS							,
	NODE_TIMES							,
	NODE_DIVISION						,
	NODE_REMAINDER						,
	NODE_OPPOSITE						,
	NODE_NEGATIVE						,
	NODE_AND							,
	NODE_OR								,
	NODE_LEQ							,
	NODE_LT								,
	NODE_GEQ							,
	NODE_GT								,
	NODE_EQ								,
	NODE_NE								,
} NodeType;

/**prints a string representation of this object to to file f.
 * The format of the string representation is "NodeType_description",
 * where:
 * 	\li _type is the name of a constant of NodeType, without the NODE_ prefix
 *	\li separator is the word separator in the stirng representation
 *
 * No carriage return.
 *
 * \pre
 *  \li f open on write mode
 *  \li f non NULL
 *
 * @param f the file to write on the object
 * @param _type the NodeType to write
 * @param separator indicate the character to be the word separator of the returned value. For example if the returned value is
 * 	"NODE_INT_TYPE", the function automatically remove the "NODE_" prefix. The return would be "INT_TYPE". Now you can select what to replace "_": in this way
 * 	you can have results like "INT TYPE" or "INT\nTYPE".
 */
void printNodeType(FILE* f,NodeType _type,const char* separator);





#endif /* NODETYPE_H_ */
